EMT Practice Test

1. Question Content...


Question List

Question1: A developer created a custom order management app that uses an Apex class. The order is represented by an Order object and an Orderltem object that has a master-detail relationship to Order. During order processing, an order may be split into multiple orders.
What should a developer do to allow their code to move some existing Orderltem records to a new Order record?

Question2: A developer is asked to create a Visualforce page for Opportunities that allows users to save or merge the current record.
Which approach should the developer to meet this requirement?

Question3: Given the following code snippet, that is part of a custom controller for a Visualforce page:

In which two ways can the try/catch be enclosed to enforce object and field-level permissions and prevent the DML statement from being executed if the current logged-in user does not have the appropriate level of access? Choose 2 answers

Question4: What should be used to create scratch orgs?

Question5: Management asked for opportunities to be automatically created for accounts with annual revenue greater than
$1,000,000. A developer created the following trigger on the Account object to satisfy this requirement.

Users are able to update the account records via the UI and can see an opportunity created for high annual revenue accounts. However, when the administrator tries to upload a list of 179 accounts using Data Loader, It fails withsystem. Exception errors.
Which two actions should the developer take to fix the code segment shown above?
Choose 2 answers

Question6: Which three per-transaction limits have higher governor limits in asynchronous Apex transactions?

Question7: A developer must create an Apex class, contactcontroller, that a Lightning component can use to search for Contact records. User of the Lightning component should only be able to search Contact records to which they have access. Which two will restrict the records correctly?

Question8: Which Lightning code segment should be written to declare dependencies on a Lightning component, c:accountList, that is used in a Visualforce page?
A)

B)

C)

D)

Question9: For which three items can a trace flag be configured?
Choose 3 answers

Question10: How can a developer check the test coverage of active Process Builder and Flows deploying them in a Changing Set?

Question11: Application Events follow the traditional publish-subscribe model. Which method is used to fire an event?

Question12: Which Apex class contains methods to return the amount of resources that have been used for a particular governor, such as the number of DML statements?

Question13: What are two benefits of using declarative customizations over code? Choose 2 answers What are two benefits of using declarative customizations over code?

Question14: Universal Containers decides to use purely declarative development to build out a new Salesforce application.
Which three options can be used to build out the business logic layer for this application?
Choose 3 answers

Question15: Which three Salesforce resources can be accessed from a Lightning web component?
Choose 3 answers

Question16: AW Computing (AWC) handles orders In Salesforce and stores Its product Inventory In a fter, inventory__c, on a custom object, Product__c. When en order for aProduct__c Is placed, the inventory__c field Is reduced by the quantity of the order using an Apex trigger.

AWC wants the real-time inventory reduction for a product to be sent to many of Its external systems, Including some future systems the company Iscurrently planning.
What should a developer add to the code at the placeholder to meet these requirements?
A)

B)

C)

D)

Question17: In the following example, which sharing context will myMethod execute when it is invoked?

Question18: A developer needs to create a custom button for the Account object that, when clicked, will perform a series of calculation and redirect the user to a custom visualforce page.
Which three attributes need to be defined with values in the <apex:page> tag to accomplish this?
Choose 3 answers

Question19: A developer has requirement to write Apex code to update a large number of account records on a nightly basis. The system administrator needs to be able to schedule the class to run after business hours on an as-needed basis.
Which class definition should be used to successfully implement this requirement?

Question20: Since Aura application events follow the traditional publish-subscribe model, which method is used to fire an event?

Question21: A workflow updates the value of a custom field for an existing Account.
How can a developer access the updated custom field value from a trigger?

Question22: Universal Containers has a Visualforce page that displays a table of every Container_c. being ....... Is falling with a view state limit because some of the customers rent over 10,000 containers.
What should a developer change about the Visualforce page to help with the page load errors?

Question23: What can be developed using the Lightning Component framework?

Question24: A developer is debugging the following code to determinate why Accounts are not being created Account a = new Account(Name = 'A'); Database.insert(a, false); How should the code be altered to help debug the issue?

Question25: Universal Container is building a recruiting app with an Applicant object that stores information about an individual person that represents a job. Each application may apply for more than one job.
What should a developer implement to represent that an applicant has applied for a job?

Question26: Which two statements are accurate regarding Apex classes and interfaces?
Choose 2 answers

Question27: What will be the output in the debug log in the event of a QueryExeption during a call to the @query method in the following Example?

Question28: An Approval Process is defined in the Expense_Item__c. A business rule dictates that whenever auser changes the Status to 'Submitted' on an Expense_Report__c record, all the Expense_Item__c records related to the expense report must enter the approval process individually. Which approach should be used to ensure the business requirement is met?

Question29: Which three steps allow a custom SVG to be included in a Lightning web component? Choose 3 answers

Question30: A developer must write an Apex method that will be called from a Lightning component. The method may delete an Account stored in the accountRec variable.
Which method should a developer use to ensure only users that should be able to delete Accounts can successfully perform deletions?

Question31: A Salesforce developer wants to review their code changes immediately and does not want to install anything on their computer or on the org.
Which tool is best suited?

Question32: A developer needs to confirm that an Account trigger is working correctly without changing the organization's data.What would the developer do to test the Account trigger?

Question33: Get Cloudy Consulting (GCC) has a multitude of servers that host its customers' websites. GCC wants to provide a servers status page that is always on display in its call center. It should update in real time with any changes made to any servers. To accommodate this on the server side, a developer created a server Update platform event.
The developer is working on a Lightning web component to display the information.

Question34: The Job_Application__c custom object has a field that is a Master-Detail relationship to the Contact object, where the Contact object is the Master. As part of a feature implementation, a developer needs to retrieve a list containing all Contact records where the related Account Industry is 'Technology' while also retrieving the contact's Job_Application__c records.
Based on the object's relationships, what is the most efficient statement to retrieve the list of contacts?

Question35: Which two are phases in the Aura application event propagation framework? Choose 2 answers

Question36: A development team wants to use a deployment script lo automatically deploy lo a sandbox during their development cycles.
Which two tools can they use to run a script that deploys to a sandbox?
Choose 2 answers

Question37: Universal Container use a simple order Management app. On the Order Lines, the order line total is calculated by multiplying the item price with the quantity ordered. There is a Master-Detail relationship between the Order and the Order Lines object.
What is the practice to get the sum of all order line totals on the order header?

Question38: A developer needs to create a baseline set of data (Accounts, Contacts, Products, Assets) for an entire suite of test allowing them to test independent requirements various types of Salesforce Cases.
Which approach can efficiently generate the required data for each unit test?

Question39: Refer to the following code snippet for an environment has more than 200 Accounts belongingto the Technology' industry:

When the code execution, which two events occur as a result of the Apex transaction?
When the code executes, which two events occur as a result of the Apex transaction?
Choose 2 answers

Question40: Assuming that 'name; is a String obtained by an <apex:inputText> tag on a Visualforce page.
Which two SOQL queries performed are safe from SOQL injections? Choose 2 answers

Question41: What is the order of operations when a record is saved in Salesforce?

Question42: Where are two locations a developer can look to find information about the status of asynchronous or future methods? Choose 2 answers

Question43: What can used to delete components from production?

Question44: A developer is migrating a Visualforce page into a Lightning web component.
The Visualforce page shows information about a single record. The developer decides to use Lightning Data Service to access record data.
Which security consideration should the developer be aware of?

Question45: A developer must modify the following code snippet to prevent the number of SOQL queries issued from exceeding the platform governor limit. public class without sharing OpportunityService( public static List<OpportunityLineItem> getOpportunityProducts(Set<Id> opportunityIds){ List<OpportunitylineItem> oppLineItems = new List<OpportunityLineItem>(); for(Id thisOppId : opportunityIds){ oppLineItems.addAll([Select Id FROM OpportunityLineItems WHERE OpportunityId = :thisOppId)]; } return oppLineItems; } } The above method might be called during a trigger execution via a Lightning component. Which technique should be implemented to avoid reaching the governor limit?

Question46: Which action causes a before trigger to fire by default for Accounts?

Question47: A developer needs to implement a custom SOAP Web Service that is used by an external Web Application.
The developer chooses to Include helper methods that are not used by the Web Application In the Implementation of the Web Service Class.
Which code segment shows the correct declaration of the class and methods?
A)

B)

C)

D)

Question48: A developer must create a lightning component that allows users to input contact record information to create a contact record, including a salary__c custom field. what should the developer use, along with a lightning-record-edit form, so that salary__c field functions as a currency input and is only viewable and editable by users that have the correct field levelpermissions on salary__C?

Question49: A businessimplemented a magnification plan to encourage its customers to watch some educational videos.
Customers can watch videos over several days, and their progress is recorded. Award points are granted to customers for all completed videos. When the video is marked as completed in Salesforce, an external web service must be called so that points can be awarded to the user.
A developer implemented these requirements in the after update trigger by making a calf to an external web service. However, a System.CalloutException is occurring.
What should the developer do to fix this error?

Question50: A recursive transaction is limited by a DML statement creating records for these two objects:
1. Accounts
2. Contacts
The Account trigger hits a stack depth of 16.
Which statement is true regarding the outcome of the transaction?

Question51: Which statement is true about developing in a multi-tenant environment?

Question52: When importing and exporting data into Salesforce, whichtwo statements are true?
Choose 2 answers

Question53: Which two statements accurately represent the MVC framework implementation in Salesforce? Choose 2 answers

Question54: A developer created a weather app that contains multiple Lightning web components.
One of the components, called Toggle, has a toggle for Fahrenheit or Celsius units. Another component, called Temperature, displays the current temperature in the unit selected in the Toggle component When a user toggles from Fahrenheit to Celsius or vice versa in the Toggle component, the information must be sent to the Temperature component so the temperature can be converted and displayed.
What is the recommend way to accomplish this?

Question55: A primaryid_c custom field exists on the candidate_c custom object. The filed is used to store each candidate's id number and is marked as Unique in the schema definition.
As part of a data enrichment process. Universal Containers has a CSV file that contains updated data for all candidates in the system, the file contains each Candidate's primary id as a data point. Universal Containers wants to upload this information into Salesforce, while ensuring all data rows are correctly mapped to a candidate in the system.
Which technique should the developer implement to streamline the data upload?

Question56: Which three process automations can immediately send an email notification to the owner of an Opportunity when its Amount is changed to be greater than $10,000? Choose 3 answers

Question57: A Next Best Action strategy uses an Enhance Element that invokes an Apex method to determinea discount level for a Contact, based on a number of factors. What is the correct definition of the Apex method?

Question58: A team of many developers work in their own individual orgs that have the same configuration at the production org. Which type of org is best suited for this scenario?

Question59: Universal Containers has a support process that allows users to request support from its engineering team using a custom object, Engineering_Support__c.
Users should be able to associate multiple engineering_Support__c records to a single Opportunity record.
Additionally, aggregate Information about the Engineering_support__c records should be shown on the Opportunity record.
What should a developer Implement to support these requirements?

Question60: What is a benefit of developing applications in a multi-tenant environment?

Question61: The following code snippet is executed by a Lightning web component in an environment with more than
2,000 lead records:

Which governor limit will likely be exceeded within the Apex transaction?

Question62: A developer needs to prevent the creation of Request_c records when certain conditions exist in the system. A RequestLogic class exists to checks the conditions. What is the correct implementation?

Question63: A developer has a requirement to create an Order When an Opportunity reaches a "Closed-Won" status.
Which tool should be used to implement this requirement?

Question64: A developer is implementingan Apex class for a financial system. Within the class, the variables 'creditAmount' and 'debtAmount' should not be able to change once a value is assigned. In which two ways can the developer declare the variables to ensure their value can only be assigned one time? Choose 2 answers

Question65: Which scenario is valid for execution by unit tests?

Question66: Universal Containers recently transitioned from Classic to Lighting Experience. One of its business processes requires certain value from the opportunity object to be sent via HTTP REST callout to its external order management system based on a user-initiated action on the opportunity page. Example values are as follow
* Name
* Amount
* Account
Which two methods should the developer implement to fulfill the business requirement? (Choose 2 answers)

Question67: A develop completed modification to a customized feature that is comprised of two elements:
Apex trigger
Trigger handler Apex class
What are two factors that the developer must take into account to properly deploy the modification to the production environment?

Question68: A developer identifies the following triggers on the Expense_c object:
DeleteExpense,
applyDefaultstoexpense
validateexpenseupdate;
The triggers process before delete, before insert, and before update events respectively.
Which two techniques should the developer implement to ensure trigger best practice are followed?

Question69: Which statement should be used to allow some of the records in a list of records to be inserted rf others fail to be inserted?

Question70: Universal Container uses Service Cloud with a custom field, stage_c, on the Case object.
Management wants to send a follow-up email reminder 6 hours after the stage_c field is set to '';Waiting on customer'' The .... Administrator wants to ensure the solution used is bulk safe.
Which two automation tools should a developer recommend to meet these business requirements?
Choose 2 answers

Question71: Which code displays the contents of a Visualforce page as a PDF?

Question72: Which aspect of Apex programming is limited due to multitenancy?

Question73: What are two characteristics related to formulas? Choose 2 answers.

Question74: Which two settings must be defined in order to update a record of a junction object? Choose 2 answers

Question75: A developer wants to import 500 Opportunity records into a sandbox. Why should the developer choose to use data Loader instead of Data Import Wizard?

Question76: A developer Edition org has five existing accounts. A developer wants to add 10 more accounts for ...
The following code is executed in the Developer Console using the Executor Anonymous window:

How many total accounts will be in the org after this code is executed?

Question77: An Apex method, getAccounts, that returns a List of Accounts given a searchTerm, is available for Lightning Web components to use.
What is the correct definition of a Lightning Web component property that uses the getAccounts method?

Question78: Which two statements are true about using the @testSetup annotation in an Apex test class?
Choose 2 answers

Question79: A developer is building custom search functionality that uses SOSL to search account and contact records that match search terms provided by the end user. The feature is exposed through a Lightning web component, and the end user is able to providea list of terms to search.
Consider the following code snippet:

What is the maximum number of search terms the end user can provide to successfully execute the search without exceeding a governor limit?

Question80: How can a developer implement this feature?

Question81: As part of a data cleanup strategy, AW Computing wants to proactively delete associated opportunity records when the related Account is deleted.
Which automation tool should be used to meet this business requirement?

Question82: The values 'High', 'Medium', and 'Low' are Identified as common values for multiple picklist across different object. What is an approach a developer can take to streamline maintenance of the picklist and their values, while also restricting the values to the ones mentioned above?

Question83: Universal Containers wants Opportunities to no longer be editable when it reaches the Closed/Won stage.
Which two strategies can a developer use to accomplish this?
Choose 2 answers

Question84: Which two sfdx commands can be used to add testing data to a Developer sandbox?

Question85: How many accounts will be inserted by the following block ofcode? for(Integer i = 0 ; i < 500; i++) { Account a = new Account(Name='New Account ' + i); insert a; }

Question86: code below deserializes input into a list of Accounts.

Which code modification should be made to insert the Accounts so that field-level security is respected?

Question87: When using SalesforceDX, what does a developer need to enable to create and manage scratch orgs?

Question88: A developer creates a Lightning web component that imports a method within an Apex class. When a Validate button is pressed, the method runs to execute complex validations.
In this implementation scenario, which artifact is part of the Controller according to the MVC architecture?

Question89: A developer writes a trigger on the Account object on the before update event that increments a count field. A workflow rule also increments the count field every time that an Account is created or updated. The field update in the workflow rule is configured to not re-evaluate workflow rules.
What is the value of the count field if an Account is inserted with an initial value of zero, assuming no other automation logic is implemented on the Account?

Question90: How does the Lightning Component framework help developers implement solutions faster?